// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_hm_incoming_relays
// * CreateDate    : 2014-06-05 18:29:58
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:29:58
// * LastChanger   : 2014-06-05 18:29:58
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class HmIncomingRelaysEntity : EntityBase
    {
        public HmIncomingRelaysTable TableSchema
        {
            get
            {
                return HmIncomingRelaysTable.Current;
            }
		}
		
		public HmIncomingRelaysEntity()
        {

        }
		
		public HmIncomingRelaysEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Relayid = Convert.ToInt32(CommonFunctions.ToObject(dr["relayid"]));
			this.Relayname = Convert.ToString(CommonFunctions.ToObject(dr["relayname"]));
			this.Relaylowerip1 = Convert.ToInt64(CommonFunctions.ToObject(dr["relaylowerip1"]));
			this.Relaylowerip2 = Convert.ToInt64(CommonFunctions.ToObject(dr["relaylowerip2"]));
			this.Relayupperip1 = Convert.ToInt64(CommonFunctions.ToObject(dr["relayupperip1"]));
			this.Relayupperip2 = Convert.ToInt64(CommonFunctions.ToObject(dr["relayupperip2"]));
        }
		
		public HmIncomingRelaysEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Relayid = Convert.ToInt32(CommonFunctions.ToObject(dr["relayid"]));
			this.Relayname = Convert.ToString(CommonFunctions.ToObject(dr["relayname"]));
			this.Relaylowerip1 = Convert.ToInt64(CommonFunctions.ToObject(dr["relaylowerip1"]));
			this.Relaylowerip2 = Convert.ToInt64(CommonFunctions.ToObject(dr["relaylowerip2"]));
			this.Relayupperip1 = Convert.ToInt64(CommonFunctions.ToObject(dr["relayupperip1"]));
			this.Relayupperip2 = Convert.ToInt64(CommonFunctions.ToObject(dr["relayupperip2"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return HmIncomingRelaysTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public int Relayid
        {
            get { return Convert.ToInt32(GetData(HmIncomingRelaysTable.C_relayid)); }
            set { SetData(HmIncomingRelaysTable.C_relayid, value); }
        }
		
        [DataMember]
        public string Relayname
        {
            get { return Convert.ToString(GetData(HmIncomingRelaysTable.C_relayname)); }
            set { SetData(HmIncomingRelaysTable.C_relayname, value); }
        }
		
        [DataMember]
        public long Relaylowerip1
        {
            get { return Convert.ToInt64(GetData(HmIncomingRelaysTable.C_relaylowerip1)); }
            set { SetData(HmIncomingRelaysTable.C_relaylowerip1, value); }
        }
		
        [DataMember]
        public long Relaylowerip2
        {
            get { return Convert.ToInt64(GetData(HmIncomingRelaysTable.C_relaylowerip2)); }
            set { SetData(HmIncomingRelaysTable.C_relaylowerip2, value); }
        }
		
        [DataMember]
        public long Relayupperip1
        {
            get { return Convert.ToInt64(GetData(HmIncomingRelaysTable.C_relayupperip1)); }
            set { SetData(HmIncomingRelaysTable.C_relayupperip1, value); }
        }
		
        [DataMember]
        public long Relayupperip2
        {
            get { return Convert.ToInt64(GetData(HmIncomingRelaysTable.C_relayupperip2)); }
            set { SetData(HmIncomingRelaysTable.C_relayupperip2, value); }
        }
		
		#endregion
	}
	
	
}	

